package com.lottery.ruok.lottrey.retrofitModule.response;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by ASUS on 2017/8/15.
 */

public class TrendResponse implements Parcelable{


    private List<String> nums;
    private List<String> position;
    private List<ListBean> list;
    private List<List<Integer>> show_count;
    private List<List<Integer>> average_miss;
    private List<List<String>> max_miss;
    private List<List<Integer>> max_continue;

    public List<String> getNums() {
        return nums;
    }

    public void setNums(List<String> nums) {
        this.nums = nums;
    }

    public List<String> getPosition() {
        return position;
    }

    public void setPosition(List<String> position) {
        this.position = position;
    }

    public List<ListBean> getList() {
        return list;
    }

    public void setList(List<ListBean> list) {
        this.list = list;
    }

    public List<List<Integer>> getShow_count() {
        return show_count;
    }

    public void setShow_count(List<List<Integer>> show_count) {
        this.show_count = show_count;
    }

    public List<List<Integer>> getAverage_miss() {
        return average_miss;
    }

    public void setAverage_miss(List<List<Integer>> average_miss) {
        this.average_miss = average_miss;
    }

    public List<List<String>> getMax_miss() {
        return max_miss;
    }

    public void setMax_miss(List<List<String>> max_miss) {
        this.max_miss = max_miss;
    }

    public List<List<Integer>> getMax_continue() {
        return max_continue;
    }

    public void setMax_continue(List<List<Integer>> max_continue) {
        this.max_continue = max_continue;
    }

    public static class ListBean implements Parcelable{


        /**
         * id : 8654
         * issue_no : 20170815040
         * prize_num : 2,9,2,5,4
         * issue_date : 1502726400
         * created_at : 2017-08-15 12:41:02
         * missing : [["7","1","0","3","14","26","8","5","9","4"],["5","1","2","37","7","3","28","8","10","0"],["13","36","0","6","1","2","17","3","5","16"],["1","4","2","8","9","0","5","12","13","3"],["2","1","16","7","0","10","6","52","4","27"]]
         */

        private String id;
        private String issue_no;
        private String prize_num;
        private String issue_date;
        private String created_at;
        private List<List<String>> missing;

        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }

        public String getIssue_no() {
            return issue_no;
        }

        public void setIssue_no(String issue_no) {
            this.issue_no = issue_no;
        }

        public String getPrize_num() {
            return prize_num;
        }

        public void setPrize_num(String prize_num) {
            this.prize_num = prize_num;
        }

        public String getIssue_date() {
            return issue_date;
        }

        public void setIssue_date(String issue_date) {
            this.issue_date = issue_date;
        }

        public String getCreated_at() {
            return created_at;
        }

        public void setCreated_at(String created_at) {
            this.created_at = created_at;
        }

        public List<List<String>> getMissing() {
            return missing;
        }

        public void setMissing(List<List<String>> missing) {
            this.missing = missing;
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeString(this.id);
            dest.writeString(this.issue_no);
            dest.writeString(this.prize_num);
            dest.writeString(this.issue_date);
            dest.writeString(this.created_at);
            dest.writeList(this.missing);
        }

        public ListBean() {
        }

        protected ListBean(Parcel in) {
            this.id = in.readString();
            this.issue_no = in.readString();
            this.prize_num = in.readString();
            this.issue_date = in.readString();
            this.created_at = in.readString();
            this.missing = new ArrayList<>();
            in.readList(this.missing, List.class.getClassLoader());
        }

        public static final Creator<ListBean> CREATOR = new Creator<ListBean>() {
            public ListBean createFromParcel(Parcel source) {
                return new ListBean(source);
            }

            public ListBean[] newArray(int size) {
                return new ListBean[size];
            }
        };
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeStringList(this.nums);
        dest.writeStringList(this.position);
        dest.writeTypedList(list);
        dest.writeList(this.show_count);
        dest.writeList(this.average_miss);
        dest.writeList(this.max_miss);
        dest.writeList(this.max_continue);
    }

    public TrendResponse() {
    }

    protected TrendResponse(Parcel in) {
        this.nums = in.createStringArrayList();
        this.position = in.createStringArrayList();
        this.list = in.createTypedArrayList(ListBean.CREATOR);
        this.show_count = new ArrayList<>();
        in.readList(this.show_count, List.class.getClassLoader());
        this.average_miss = new ArrayList<>();
        in.readList(this.average_miss, List.class.getClassLoader());
        this.max_miss = new ArrayList<>();
        in.readList(this.max_miss, List.class.getClassLoader());
        this.max_continue = new ArrayList<>();
        in.readList(this.max_continue, List.class.getClassLoader());
    }

    public static final Creator<TrendResponse> CREATOR = new Creator<TrendResponse>() {
        public TrendResponse createFromParcel(Parcel source) {
            return new TrendResponse(source);
        }

        public TrendResponse[] newArray(int size) {
            return new TrendResponse[size];
        }
    };
}
